package com.xyd.Biz.Impl;

import com.xyd.Biz.AddressBiz;
import com.xyd.Dao.TAddressDao;
import com.xyd.Entity.TAddress;
import com.xyd.Entity.User;
import com.xyd.Util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;

public class AddressBizImpl implements AddressBiz {
    SqlSession sqlSession = null;
    TAddressDao tAddressDao = null;

    public AddressBizImpl() {
        sqlSession = SqlSessionFactoryUtil.open();
        tAddressDao = sqlSession.getMapper(TAddressDao.class);
    }

    @Override
    public TAddress getAddressByUser(User user) {
        return tAddressDao.getAddressByUser(user);
    }
}
